package com.banciyuan.bcywebview.base.helper.push.Item;

import android.content.Context;
import android.content.Intent;

import com.banciyuan.bcywebview.biz.web.WebActivity;
import com.banciyuan.bcywebview.utils.intent.gotoUtil;

import it.sauronsoftware.base64.Base64;

/**
 * Created by hy on 2016/1/19.
 */
public class PushItemSeventh extends BasePush {
    @Override
    public void goPushActivity(Context mContext) {
        super.goPushActivity(mContext);
        if (msgs.length == 3) {
            goWebActivity();
        } else {
            goMain();
        }
    }

    private void goWebActivity() {
        Intent intent = new Intent(mContext, WebActivity.class);
        String msg = msgs[2];
        msg = Base64.decode(msg);
        intent.putExtra(gotoUtil.INTENT_VALUE_ONE, msg);
        intent.putExtra(gotoUtil.INTENT_VALUE_TWO, imageUrl);
        goActivities(intent);
    }
}
